In recent years, the magnetic sensor using the vertical Hall element for detecting a horizontal magnetic field component with respect to the surface of a substrate is proposed in, for example, “Three-dimensional integrated magnetic sensor”, Journal of IEE Japan C, pp. 483-490, No. 7, Vol. 109, 1989. FIGS. 26A and 26B are schematic constructional views showing one example of the above vertical Hall element, where FIG. 26A is a plan view, and FIG. 26B is a cross-sectional view along line XXVIB-XXVIB of FIG. 26A.
As shown in FIGS. 26A and 26B, a Hall element 30 of the vertical type has a semiconductor substrate 31 constructed by, e.g., silicon of P-type, and a semiconductor layer 32. The semiconductor layer 32 is constructed by silicon of N-type formed by, e.g., epitaxial growth on a burying layer 36 formed by introducing impurities of N-type on the surface of the semiconductor substrate 31. The burying layer 36 is constructed by N-type of concentration higher than that of the semiconductor layer 32. Further, electrodes 35a to 35c for supplying a driving electric current and electrodes 35d and 35e for detecting a Hall voltage are arranged on the semiconductor layer 32. Here, the electrode 35a is arranged in a shape nipped by both electrodes 35b, 35c and electrodes 35d, 35e arranged in a shape perpendicular to these electrodes 35b and 35c. Further, N+ diffusion layers 33a to 33e constructed by N-type of concentration higher than that of the semiconductor layer 32 are formed on the surface of the semiconductor layer 32 so as to form ohmic contact with these electrodes 35a to 35e. Further, a diffusion area 34 of P-type is formed in the semiconductor layer 32 in a shape surrounding the circumference of all the electrodes 35a to 35e. Further, diffusion areas 34a, 34b of P-type are formed inside the diffusion area 34 in a shape surrounding the circumference of electrodes 35a, 35d, 35e. Here, diffusion areas 34a, 34b are extended in a mode connected to the burying layer 36 formed on a bottom face of the semiconductor layer 32. Further, the diffusion area 34 is extended in a mode connected to the semiconductor substrate 31. In this Hall element 30, a portion partitioned by their diffusion areas 34a, 34b and the burying layer 36 becomes a so-called magnetic detecting portion HP. Namely, in this Hall element 30, magnetism (magnetic field) applied to this magnetic detecting portion HP is detected. For example, when a constant electric current is respectively flowed between electrodes 35a and 35b and between electrodes 35a and 35c, the electric current including a component perpendicular to a substrate surface is flowed from the electrode 35a to the burying layer 36. At this time, when a magnetic field including a horizontal component with respect to the substrate surface is applied to this Hall element 30, a Hall voltage is generated between electrodes 35d and 35e by the Hall effect. Therefore, the horizontal magnetic field component can be calculated by detecting this Hall voltage through these electrodes 35d and 35e. 
The above Hall element 30 of the vertical type is complicated in structure in comparison with a lateral Hall element. Accordingly, an unbalance of an electric potential distribution is caused by an influence such as an alignment shift, the shape of an element, etc., and an offset voltage (unbalance voltage) is easily caused. The offset voltage corresponds to an output voltage when no magnetic field is applied.
Further, as shown in FIGS. 27A and 27B, electrodes 45a, 45b for supplying the driving electric current and electrodes 45c, 45d for detecting the Hall voltage are respectively arranged at four corners of a portion surrounded by a diffusion area 43 in opposite shapes on a semiconductor layer 42 in the Hall element 40 of the lateral type. Terminals S, G, Va, Vb are respectively electrically connected to respective electrodes 45a to 45d. Accordingly, as shown in FIG. 27C, a magnetic field component perpendicular to the substrate surface is detected while terminals S, G (electrodes 45a, 45b) for supplying the driving electric current and terminals Va, Vb (electrodes 45c, 45d) for detecting the Hall voltage are replaced and a flowing direction of the driving electric current is switched in directions XXVIIA and XXVIIB (i.e., while a spinning current method is applied). Thus, the offset voltage can be reduced (canceled). FIGS. 27A to 27C are schematic constructional views showing one example of the conventional Hall element 40 of the lateral type, where FIG. 27A is a plan view, and FIG. 27B is a cross-sectional view along line L12-L12 of FIG. 27A, and FIG. 27C is a typical view for explaining the spinning current method. Reference numeral 41 within FIGS. 27A to 27C designates a semiconductor substrate constructed by e.g., silicon of P-type (first electric conductivity type). Reference numeral 42 designates a semiconductor layer constructed by silicon of N-type (second electric conductivity type) formed by e.g., epitaxial growth. Reference numeral 43 designates a diffusion area of P-type for separating the Hall element 40 from other elements. Reference numeral 44 designates contact areas 44a to 44d formed on the surface of the semiconductor layer 42 so as to form ohmic contact with electrodes 45a to 45d. 
However, in the case of the above Hall element 30 of the vertical type, as shown in FIG. 26A, electrodes 35d, 35e for detecting the Hall voltage are arranged so as to nip one electrode 35a for supplying the electric current therebetween. Namely, four electrodes constructed by electrodes 35a, 35b (to 35c) for supplying the electric current and electrodes 35d, 35e for detecting the Hall voltage are asymmetrically arranged. Accordingly, even when a spinning current is performed, no offset voltage can be reduced as in the above Hall element 40 of the lateral type.